package cn.jy.boot.mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;

import cn.jy.boot.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
* @author Ag
* @description 针对表【t_user】的数据库操作Mapper
* @createDate 2022-04-16 22:17:18
* @Entity cn.jy.boot.pojo.User
*/
public interface UserMapper extends BaseMapper<User> {

    @ResultMap("BaseResultMap")
    @Select("<script>"
            + "select <include refid=\"Base_Column_List\"/>"
            + "from t_user"
            + "<where>"
            + "<if test=\"age != null\">"
            + "age = #{age,jdbcType=NUMERIC}"
            + "</if>"
            + "</where>"
            + "order by  "
            + "</script>")
    List<User> selectByAgeOrderByUidDesc(@Param("age") Integer age);

}




